import request from "@/utils/request.js"

// 热搜榜列表   /search/hot/detail
export function searchHotDetailList(){
  return new Promise((reslove,reject)=>{
    request({
      url: '/search/hot/detail',
      method:'GET',
      success: ({data:res}) => {
        reslove(res)
      }
    })
  })
}

// 搜索关键字    /search?keywords=海阔天空
export function searchWord(word){
  return new Promise((reslove,reject)=>{
    request({
      url: '/search?keywords='+word,
      method:'GET',
      success: ({data:res}) => {
        reslove(res)
      }
    })
  })
}

// 搜索提示    /search/suggest?keywords=海阔天空&type=mobile
export function searchSuggest(word){
  return new Promise((reslove,reject)=>{
    request({
      url: '/search/suggest?keywords='+ word +'&type=mobile',
      method:'GET',
      success: ({data:res}) => {
        reslove(res)
      }
    })
  })
}